<p>
<%= params[:notice] %>
</p>

<div class="CSSTableGenerator">
  <table border="1">
    <tr>
      <th>Name</th>
      <th>State</th>
      <th>Message</th>
      <th>Progress</th>
      <th>RMSE</th>
      <th>Updated</tb>
      <th>Reset</th>
      <th>Train</th>
      <th>Score</th>
    </tr>
 
    <% @models.each do |model| %>
    <tr>
      <td><%= model.klass %></td>
      <td><%= model.state %></td>
      <td><%= model.message %></td>
      <td><%= '%3.3f' % (100.0 * model.progress) %>%</td>
      <td><%= '%1.5f' % model.rmse %></td>
      <td><%= model.updated_at %></td>
      <td><%= link_to "Reset", reset_model_path(model), method: :post %></td>
      <td><%= link_to "Train", train_model_path(model), method: :post %></td>
      <td><%= ["trained", "scored"].to_set.member?(model.state) ? (link_to "Score", score_model_path(model)) : "not trained" %></td>
    </tr>
  <% end %>
  </table>
</div>
